﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Audio;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.GamerServices;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
using Microsoft.Xna.Framework.Media;
using SpriteObjects;

namespace GameEntity
{
    public abstract class AbstractVisible : AbstractGameEntity
    {
        private My2DSprite[] _sprites;

        internal My2DSprite[] Sprites
        {
            get { return _sprites; }
            set { _sprites = value; }
        }
        private int _nSprite;

        public int NSprite
        {
            get { return _nSprite; }
            set { _nSprite = value; }
        }

        public void Update(GameTime gametime)
        {
            for (int i = 0; i < _nSprite; i++)
            {
                _sprites[i].Update(gametime);
            }
        }

        public void Draw(GameTime gameTime, SpriteBatch spriteBatch)
        {
            for (int i = 0; i < _nSprite; i++)
            {
                _sprites[i].Draw(gameTime, spriteBatch);
            }
        }

    }
}
